Method and apparatus to enable the high speed evaluation of bar code indicia

ABSTRACT

A method and apparatus to enable the high speed evaluation of the quality of a bar code indicia by processing a scan reflectance profile signal generated by a scanner unit. The scan reflectance profile signal is sampled by an analog-to-digital converter, with the sample values from the converter processed as they are produced in real-time to determine a highest positive peak sample value and a lowest negative peak sample value for each element of the bar code indicia. The lowest negative and highest positive peak sample values for each element being accessible for post-processing to determine at least one figure of merit indicative of the quality of the bar code indicia being evaluated. The samples produced by the a/d converter are processed as they are generated to filter and reduce the total collection of sample values stored and/or considered, while still providing the critical highest and lowest peak sample values for the scanned elements to enable high speed verification.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to the evaluation of the quality of barcode indicia and, more particularly, to a method and apparatus tosupport high speed evaluation and verification of bar code indicia byprocessing scan reflectance profile signals in real-time.

2. Description of the Prior Art

At present bar code indicia are found in a wide range of applicationsand industries. Virtually every retail product marketed in supermarkets,retail stores, discount outlets, as well as many other establishments,utilize bar code symbols at their point-of-sale terminals, to monitorinventory levels, to generate orders for low inventory items, etc.Parcel post companies rely heavily on the use of bar code indicia tomonitor the location and status of packages in transit. Further, barcode indicia are universally employed in most countries around theworld.

A large number of varied printing techniques are employed to apply barcode indicia to packages and containers. In all cases there is a need toverify the quality of the resulting indicia. Considerations such as thedecodability, symbol contrast, first read rate (FRR), substitution errorrate (SER), and others, are of critical importance when evaluating thequality of bar code indicia.

Bar code verification systems are well known in the art. Typically,these systems produce an analog signal known as a scan reflectanceprofile signal, or simply the scan reflectance signal, which isrepresentative of the elements comprising the bar code indicia. The scanreflectance signal is often sampled, by a device such as ananalog-to-digital converter, to produce a collection of sample valuesrepresentative of the entire scan reflectance profile signal that arestored in a memory unit. The entire collection of sample values isgenerally very large and must be completely processed to evaluate thequality of the bar code indicia. Systems utilizing this method, whereinthe entire scan reflectance profile signal is sampled and the samplevalues stored in memory, require a large sample memory. In addition,these systems are processor intensive, essentially requiring the entireprocessing power of the system CPU during sample processing andanalysis. As a result, systems of this type are generally not capable ofsupporting real-time high speed verification. And if they are, they areoverly expensive.

An example of an application where a high speed real-time evaluation andverification system would be desired is a system employed during theautomated filling of a container on a conveyor line, wherein a bar codeindicia is printed on the container. In this case verification inreal-time is desired to detect when problems arise in the bar codeprinting process--at which point the line may be stopped to correct theproblem. Generally in situations where full 100% verification isrequired, very high cost verifiers are employed, or the speed of theconveyor or assembly line is reduced.

Other systems are known that begin to process data samples as they arebeing generated and loaded into memory structures such as afirst-in-first-out (FIFO) memory. Although, these systems decrease thetime required for evaluation and verification of bar code indicia byoverlapping in time the steps of generating sample values and processingsample values, they still require relatively large amounts of samplememory and consume most available CPU processing power. Again, due tothe large number of sample values that must be processed and analyzed,they too are generally not capable of high speed real-time verification.

At present, several standard guidelines have been established toquantitatively evaluate the quality of bar code indicia. Two suchguidelines have been defined by the American National StandardsInstitute (ANSI), and the Uniform Code Council (UCC). The ANSI guideline(ANSI X3.182-1990) is titled "Bar Code Print Quality Guideline". The UCCguideline is titled "Quality Specification for the UPC Printed Symbol"(September 1994). The ANSI and UCC documents are hereby incorporated byreference. In particular, the ANSI document provides in section 4measurement methodologies and related information, while parts 2 and 3of the UCC document provide definitions and related measurement subjectmatter. These two documents define a number of figures of merit whichcan be determined from the sampled scan reflectance profile signal.However, since each guideline defines an entire procedure forevaluation, and further requires a succession of scans taken at equallyspaced locations within an "interrogation window" along the height ofthe elements comprising the bar code indicia, they have placed furtherdemands on systems which are utilized to evaluate and verify the printedand general quality of bar code indicia. It is no longer the case wherea few simple checks, such as decodability and scan contrast may beemployed to determine the quality of indicia.

With the advent of rigorous and well defined quantitative measures toevaluate bar code indicia, such as the common UPC bar code symbol, thereis a need for improved methods and associated apparatus to supportevaluation and verification, particularly in real-time where 100%verification is desired. Objects of the present invention are,therefore, to provide new and improved methods and apparatus to supportevaluation and verification of bar code indicia having one or more ofthe following capabilities, features, and/or characteristics:

enable high speed evaluation and verification;

detection and quantification of indicia defects;

relatively low cost implementation using components and devices readilyavailable;

enable high speed verification as bar code indicia are being printed;

support 100% real-time verification in demanding applications;

process sample data as it is generated in order to store in memory onlythe critical samples that are necessary for quantitative evaluation;

reduce the amount of sample memory and processing overhead required.

SUMMARY OF THE INVENTION

In accordance with the invention, a method and apparatus are disclosedto enable high speed evaluation and verification of bar code indicia.

The method for evaluating and verifying the quality of a bar codeindicia is provided by processing a scan reflectance profile signalrepresentative of the elements of the indicia. The scan reflectanceprofile signal is generated by scanning the indicia. The method includesthe step of sampling the scan reflectance signal to provide a sequenceof sample values representative of each element comprising the bar codeindicia, and further provides for the processing the sequence of samplevalues as they are produced to determine a highest positive peak samplevalue and a lowest negative peak sample value associated with eachelement comprising the bar code indicia. The plurality of pairs of peaksample values, wherein each pair of values consists of the highestpositive and lowest negative peak sample values for each element, areaccessible for post-processing to determine at least one figure of meritindicative of the quality of the bar code indicia.

The apparatus for evaluating and verifying the quality of a bar codeindicia processes a scan reflectance profile signal generated by ascanner unit and representative of the elements comprising the bar codeindicia. The apparatus includes an analog-to-digital converter toproduce a sequence of samples wherein each sample value isrepresentative of the analog value of the scan reflectance signal. Anedge detection unit is included to detect edges present in the scanreflectance profile signal, the edges indicative of the start ofelements comprising the bar code indicia being evaluated. A peak sampledetermining unit is employed to determine a highest positive peak samplevalue and a lowest negative peak sample value produced by theanalog-to-digital converter for each element of the indicia. The highestpositive and lowest negative peak sample values associated with alreadyprocessed elements are accessible to begin post-processing to determineat least one figure of merit indicative of the quality of the bar codeindicia.

For a better understanding of the invention, together with other andfurther objects, reference is made to the accompanying drawings and therelated detailed description, with the scope of the invention pointedout in the appended claims.

BRIEF DESCRIPTION OF THE DRAWINGS

In the drawings, like elements are assigned like reference numerals. Thedrawings are briefly described as follows.

FIGS. 1A and 1B illustrate, respectively, an ideal bar code indicia anda corresponding ideal scan reflectance profile signal.

FIG. 2 depicts a portion of a non-ideal bar code indicia, along with ascan reflectance profile signal representative of the non-ideal indicia.

FIG. 3 is an enlarged view of a portion of a typical scan reflectanceprofile signal.

FIG. 4 is a high level block diagram for an embodiment of the invention.

FIG. 5A is a functional block diagram of an embodiment of a negativepeak determining unit to collect a negative peak sample value.

FIG. 5B is a functional block diagram of an embodiment of a positivepeak determining unit to collect a positive peak sample value.

FIG. 6 provides a functional block diagram of an embodiment of theinvention for determining the highest positive peak sample value and thelowest negative peak sample value for a portion of a scan reflectancesignal representative of an element of a bar code indicia.

DETAILED DESCRIPTION OF THE INVENTION

Referring now to FIG. 1A, there is illustrated an ideal bar code indicia20 comprised of a number of bars 22, and spaces 24 disposedtherebetween. Together, the bars 22 and the spaces 24 comprise theelements of the bar code indicia 20. By scanning the elements of the barcode indicia 20 using a scanner unit a scan reflectance profile signalis generated. Scanning devices, such as optical laser scanners, are wellknown in the art. These devices are readily available in varying formsfrom a number of manufacturers.

A typical scanner unit sweeps a laser beam spot 28 at nearly constantvelocity across the bar code indicia 20, from left to right as shown inFIG. 1A, and produces in real-time a scan reflectance profile signalsuch as that shown in FIG. 1B. The idealized nature of the scanreflectance profile in FIG. 1B is characterized by the very sharpvertical edges, such as edge 34, and the very flat horizontal portionstherebetween, such as reflectance level 36. It can be noted that thereflectance level 36, which represents the level of reflected lightassociated with a bar, is equal to the reflectance level of each bar ofan idealized indicia and the corresponding portions of the scanreflectance profile. A level such as level 36 is defined as a negativepeak value. It can also be noted that all negative peaks, such as 36 areconsidered lowest negative peaks, as all the negative peaks have thesame minimum reflectance. Further, the level 38, which indicates thelevel of reflected light associated with a space, is equal to the levelof reflectance for each space in an idealized indicia/profile. A levelsuch as level 38 is defined as a positive peak value.

Referring now to FIG. 2 there is shown a portion of a non-idealized barcode indicia 40 and its representative scan reflectance profile signal44. The enlarged elements of bar code indicia 40 are depicted withvoids, such as void 46 (of the left most bar element), and with spots,such as spot 48. These kinds of print errors manifest themselves asspikes and dips when a scan reflectance profile signal 44 is generatedwith a scanner unit having appropriate operating characteristics.Imperfections such as negative peak 50 and positive peak 52, whetherassociated with a bar element or a space element, may reduce the abilityof a bar code reader to properly interpret a bar code indicia. Forexample, a drop in the first-read rate may result, or worse yet, asubstitution error may occur (i.e. an incorrect interpretation of theactual a bar code indicia's encoded digits). Methods and apparatus, suchas those of the present invention, are useful when employed to evaluatethe quality of printed bar code indicia, and detect and quantify suchdefects.

As discussed herein, the scan reflectance profile signal 44 of FIG. 2,which is generated by a scanner unit, is very often sampled andconverted to a series of numerical sample values. The entire collectionof sample values are stored in memory, generally as they are produced,and processed at a later time to determine at least one commonlyemployed quantitative figure of merit that is indicative of the qualityof the bar code indicia.

For completeness, and to illustrate an important aspect of theinvention, it will be helpful to define several key terms used todescribe and discuss scan reflectance profile signals, as well asintroduce several common figures of merit used to quantitativelyevaluate and verify bar code indicia.

R(max): The largest value of reflectance for an entire scan reflectanceprofile signal.

R(min): The smallest value of reflectance for an entire scan reflectanceprofile signal.

R(b): The smallest value of reflectance within a bar element.

R(s): The largest value of reflectance within a space element.

Global Threshold: A line which may be defined midway between R(max) andR(min), and can be utilized to determine a transition point between barsand spaces. Those portions of the scan reflectance signal which areabove a global threshold line are representative of spaces, while thoseportions below are representative of bars. An example of a globalthreshold level 66 is illustrated in FIG. 3.

It is important to note that the terms listed above, as well as others,may be determined by simply collecting the sample values correspondingto a highest positive peak of the reflectance value and a lowestnegative peak of the reflectance value associated with each elementcomprising the indicia being evaluated. That is, rather than capturing acomplete collection of all sample values representative of the entirescan reflectance profile for an element, a pair of peak values comprisedof the highest positive and lowest negative peak (reflectance) samplevalues for each element will suffice. The collection of pairs of peakvalues for each element, when combined with a width count valueindicative the width of each element will allow virtually all thefigures of merit commonly used to quantitatively assess the quality ofbar code indicia being evaluated.

Several examples of common figures of merit include symbol contrast(SC), edge contrast (EC), modulation, element reflectance nonuniformity(ERN), and decodability. The symbol contrast figure of merit isdetermined by subtracting R(min) from R(max), and is sometimesnormalized with respect to the R(max) level. Edge contrast is determinedfor each element by taking the difference between R(s) and R(b) foradjacent elements, including the quite zones. (For the purposes of thisdisclosure and related discussions, the quite zones will be consideredelements along with the bars and spaces comprising the bar codeindicia.) Element reflectance nonuniformity, or ERN, is a quantitativefigure of merit indicative of defects of the indicia, such as spots andvoids. ERN is determined by taking the difference between the highestpositive peak value and the lowest negative peak value within eachindividual element of the indicia. A defect factor may then bedetermined by dividing the ERN by the SC. The ANSI and UCC print qualityguidelines additionally provide for the assigning of grades to itemssuch as the symbol contrast, as well as most other figures of merit. Thegrade may in the form of a "numerical grade" and/or a "letter grade" andis assigned to easily quantify most figures of merit. A more completepresentation of all current figures of merit commonly employed toquantitatively evaluate bar code indicia can be found in the ANSI andUCC documents incorporated by reference in the background section. Theterm "figure of merit" is to be defined for the purposes of thisdisclosure to indicate any possible quantitative figure of merit whichis included in the ANSI and UCC documents and can be determined by theprocessing of the highest positive and lowest negative peak samplevalues for each element, along with an associated width count (for eachelement).

Referring now to FIG. 3 there is illustrated an enlarged view of aportion of a generalized scan reflectance profile signal 56. An analysisof this scan reflectance signal will better define the meaning of ahighest positive peak sample value and a lowest negative peak samplevalue, as well as outline the method employed for the operation of theapparatus of the invention included in FIG. 3 are a pair of orthogonalaxes with the horizontal axis 62 representing increasing time (from leftto right) and the vertical axis 60 represents the relative level of thescan reflectance signal (decreasing from top to bottom). It may beassumed that this portion of the scan reflectance signal 56 isrepresentative of the first two elements of a bar code indicia. It mayfurther be assumed that a scanning spot (not shown) is sweeping fromleft to right across several elements of the bar code indicia togenerate this portion of the scan reflectance profile signal.

A first level 58 of the scan reflectance profile 56 is known as a quitezone and is a blank, white region located adjacent to the first bar ofthe indicia. A first edge 64 indicates the scanning spot produced by ascanner unit is sweeping across the indicia and moving from the quitezone onto the first bar of the bar code indicia. The corresponding levelof reflectance, therefore, will drop from a relatively high level to arelatively low level as the amount of light reflected from the dark baris low with respect to the bright quite zone. This edge, as well asother edges comprising the scan reflectance signal, may be detected by anumber of approaches well known in the art. For example, edges may bedetected comparing the current sample value produced by ananalog-to-digital converter to a previously selected global thresholdvalue, such as level 66, as shown in FIG. 3. Another method know in theart for detecting edges is to locate zero crossings of the secondderivative of the scan reflectance signal. Skilled persons willappreciate the variety of approaches that may be employed using eitheranalog or digital techniques to detect edges such as edge 64. If thescan reflectance signal is sampled as the scan reflectance profile isgenerated, sample values may be processed to determine the value of alowest negative peak 70 and a highest positive peak 72 within thecurrent bar element. It may be noted that peak 74 represents a negativepeak value, but is not of importance since it is not the "lowest"negative peak value. The process of comparing samples to the highestpositive and lowest negative peak values previously determined fromalready processed samples would continue until edge 76 is detected. Thepeak values 70 and 72 may then be stored in a memory unit, or could bemade available for immediate post-processing activities. Thepost-processing activities carried out by a post-processing computerwould use peak (sample) values such as 70 and 72 to begin to determineat least one figure of merit indicative of the quality of the bar codeindicia. The system would next begin evaluating samples in the samemanner to determine a highest positive peak sample value and a lowestnegative peak sample value for the following element represented by theportion of the scan reflectance signal between edge 76 and edge 78. Thatis, peak sample values associated with peaks 80 and 82 would next bedetermined, respectively, as shown in FIG. 3. Note, that peak 84represents a positive peak value, but is not of importance since it isnot the "highest" positive peak value. The process repeating for eachelement comprising the remainder of the bar code indicia beingevaluated.

It must be noted that the advantage of processing sample values as theyare produced to determine the highest positive and lowest negative peaksample values for each element comprising the bar code indicia is tosignificantly reduce, by one or more orders of magnitude, the amount ofsample memory required by an evaluation and verifying system. Inaddition, the CPU does not need to "filter" the important points from alarge collection of sample values thereby significantly reducing therequired processing overhead, or alternately, the length of time neededto post-process the samples actually collected.

Additionally illustrated in FIG. 3 are a series of vertical linesegments, including line segment 79, which are located below thehorizontal axis 60. These line segments are represent of one possibleset of sample intervals. It should be understood that typically manymore samples would be required to accurately process a scan reflectanceprofile signal, and that the set of line segments shown are illustrativeonly. Since, the relative width of each element must be ascertained todetermine if the bar code indicia being evaluated is decodable, onesimple approach that may be utilized to measure the relative width ofeach element is to count the samples processed from the first edge of anelement to a next adjacent edge indicating the start of the next element(and the end of the current element). The resulting count would beproportional to the relative width of an element. This method could beemployed for each element comprising the bar code indicia. Those skilledin the art will appreciate the variety of methods available fordetermining relative element widths for the elements comprising a barcode indicia.

Referring now to FIG. 4, an embodiment of the present invention is shownto evaluate the quality of a bar code indicia by processing a scanreflectance profile signal representative of a plurality of bars andspaces comprising the indicia. An important function provided by theembodiment of FIG. 4 is to determine the highest positive peak samplevalue and the lowest negative peak sample value for each element of theindicia being evaluated. These values can then be post-processed todetermine at least one figure of merit indicative of the quality of theindicia under evaluation.

A scan reflectance signal 92, as shown in FIG. 4, is generated by ascanner unit 90 that is typically provided by an optical scanning typedevice such as a laser scanner. An edge detection unit 88 monitors thescan reflectance signal 92 to detect the occurrence of an edgeindicating the start of an element of the bar code indicia. The controlbus 108 is provided to enable the various units of the embodiment ofFIG. 4 to communicate (i.e. using signal levels) and pass information,including commands, back and forth between units as required. Forexample, at the detection of a first edge of the scan reflectance signal92, the timing and control unit 100 may be arranged to initializevarious components of the present embodiment (via the control bus 108)and to initiate sampling of the scan reflectance signal 92 by ananalog-to-digital converter 94. Each sample produced by theanalog-to-digital converter 94 is representative of the analog value ofthe reflectance level of the element presently being scanned. As samplesare produced they are loaded into a newest sample storage unit 96. Itshould be noted that the newest sample storage unit 96 may actually beincorporated into the analog-to-digital converter 94. A peak sampledetermining unit 98 determines if the current sample in the newestsample storage unit 96 is either the highest positive peak sample valueor the lowest negative peak sample value produced from the scanreflectance signal for that element. If not, the value is not stored inthe peak sample determining unit 98, and will be lost when the nextsample is produced by the analog-to-digital converter 94 (and stored inthe newest sample storage unit 96). However, if the present value in thenewest sample storage unit 96 is higher or lower, respectively, than anyprevious positive peak or negative peak sample value, the current samplevalue in the newest sample storage unit 96 is loaded into the peaksample determining unit 98. This process will continue until the edgedetection unit 88 detects a next edge indicative of the start of thenext element (and the end of the current element). With the detection ofan edge, the highest positive peak sample value and the lowest negativepeak sample value determined and stored in the peak sample determiningunit 98 are then stored in a peak sample buffer memory 102 forsubsequent post-processing by a device such as a post-processingcomputer 104. The process of sampling the scan reflectance signal 92continues until the highest positive peak sample value and the lowestnegative peak sample value are determined for each element of the barcode indicia. These peak value pairs, along with the relative widths ofthe elements, enable figures of merit indicative of the quality of thebar code indicia to be determined.

As depicted in FIG. 4, the edge detection unit 88 of this embodiment isconfigured to further determine an element width count that is equal tothe number of samples associated with each element. At the occurrence ofan edge, indicating the end of an element, the element width count valuemay be loaded into an element width counts memory 106. The element widthcount values are typically used to determine the relative widths of theelements comprising the indicia being evaluated, and as such are usefulfor determining figures of merit associated with decode and decodabilityevaluation. It is possible to provide the width counting function with aseparate unit interposed between the edge detection unit 88 and theelement width counts memory 106, and such a variation is contemplated asbeing within the scope of the invention.

It should be understood that it is also contemplated that the presentinvention may be arranged to eliminate the peak sample buffer memory 102and/or the element width counts memory 106, and supply the values of thehighest positive peak sample value, the lowest negative peak samplevalue, and the element width count value (just determined for anelement) directly to a post-processing computer, such as thepost-processing computer 104.

It must also be noted that the functions of the peak sample determiningunit 98, the edge detection unit 88, and the peak sample buffer memory102 of the embodiment of the FIG. 4 may be realized employing ahardware/software (or hardware/firmware) solution, such as an embodimentincluding a high speed digital signal processing (DSP) computer. Inwhich case the pairs of peak sample values determined for each element,along with the element width counts, may be output to a second computersystem, such as the post-processing computer 104 for post-processing.Alternatively, a hardware embodiment may be employed using digital logicfunctions implemented with standard integrated logic devices orprogrammable logic devices. A more detailed description of a logic basedembodiment comprising digital logic functions will be discussed later.With the current state of technology, a most preferred embodimentcontemplated, for both cost and highest speed considerations, is ahardware implementation employing digital logic functions to collect thepeak sample value pairs and element width count values for each element.The digital logic functions may be realized by discrete integrateddevices (to provide individual logic functions) or by a variety ofprogrammable logic devices (PLDs) currently available. Skilled personswill recognize the variety of solutions available to implement theembodiment of FIG. 4

Turning again to FIG. 4, there is provided a timing and control unit100. The timing and control unit 100 is provided to coordinate theactivities of the various units of the present embodiment. For example,when the edge detection unit 88 detects a first edge indicative of thestart of the first element (a bar) of the bar code indicia, timing andcontrol unit 100 may signal (via control bus 108) for theanalog-to-digital converter 94 to begin sampling the scan reflectancesignal 92. Also, when an edge is detected by edge detection unit 88,timing and control unit 100 may be arranged to enable (again via thecontrol bus 108) the peak sample determining unit 98 to store thehighest positive and lowest negative peak sample values determined forthe previous element into the peak sample buffer memory 102. It shouldbe understood that the timing and control unit 100, which may also actas a clock source to clock various units included in the embodiment ofFIG. 4, may be implemented using discrete or programmable logic devices(possibly including a high speed microcontroller type device).

Referring now to FIG. 5A, there is provided a functional block diagramof an embodiment of a negative peak determining unit 116 to determinenegative peak sample values. The functions of the scanner unit 90, theanalog-to-digital converter 94 and the newest sample storage unit 96 areequivalent to the embodiment of FIG. 4. With this embodiment a clocksource 118 is provided to clock the analog-to-digital converter 94 toproduce samples and to further clock samples values into the newestsample storage unit 96, and selectively into a peak sample storage unit120, as will be discussed. The peak sample storage unit 120 isresponsive to a first comparator 122. The first comparator 122 isarranged to compare the relative magnitudes of the sample values storedin the peak sample storage unit 120 and the newest sample storage unit96. Initially, the peak sample storage unit 120 would be set to thehighest value that the analog-to-digital unit 94 can produce. As samplesare produced by the analog-to-digital converter 94 and stored in thenewest sample storage unit 96, the comparator 122 determines if thesample value of the newest sample storage unit 96 is less (lower) thanthe sample value stored in the peak sample storage unit 120. If thenewest sample value is less than the value of the peak sample storageunit 120, the new sample may represent a new negative peak value. Thefirst comparator 122 provides a first control signal 124 to enable thepeak sample storage unit 120 so the new sample value is stored (if it isa lower value) in the peak sample storage unit 120. This process ofstoring lower valued samples in the peak sample storage unit 120continues until a negative peak value is stored. At the point in timewhen the sample values produced by the analog-to-digital converter 96begin to increase in relative magnitude when compared to the samplevalue stored in the peak sample storage unit 120 (i.e. after a negativepeak occurs in the reflectance profile signal), a negative peak valuehas been determined and is now stored in the peak sample storage unit120. At this point, the first control signal 124 no longer enables thepeak sample storage unit 120, and the negative peak sample value storedin the peak storage unit 120 is preserved.

Due to the presence of noise, especially in digital electronic systems,a newest sample value may at any time be slightly larger than a previoussample. The next sample, or a later sample, may again be at a lowervalue than the sample value that is stored in the peak sample storageunit 120. In consideration of this possibility, a summing unit 130 isincluded in the embodiment of FIG. 5A to generate a threshold value 132.The threshold value 132 is equal to the sum of the sample value of thepeak sample storage unit 120 and an appropriate positive offset 134. Thevalue selected for the positive offset 134 is such that negates theaffect of noise in the system with respect to determining when thesample values begin to actually increase in relative magnitude. Atminimum the magnitude of the positive offset must be greater than thenoise level of the system. Alternately, the positive offset may bedynamically varied, for example, as a percentage of the peak value. Asshown in FIG. 5A, a second comparator 126 determines when the thresholdvalue 132 is of a lower relative magnitude than the sample value of thenewest sample storage unit 96. That is, the sample value in the newestsample storage unit 96 must rise to a high enough level, well above thenoise level present in the system, so that the second comparator 126does not falsely indicate via a second control signal 136, that anegative peak value has been determined. As a result, the secondcomparator 126 produces an active value on the second control signal 136(indicating a negative peak has been found) at a point in time after thepeak sample value has been determined and stored in the peak storageunit 120. The value of the peak sample storage unit 120 may then besaved and/or compared to previous negative peak sample values todetermine if it is a lowest negative peak sample value.

It should be noted that the second control signal 136 and the output 128of the peak sample storage unit 120 of FIG. 5A may also be utilizedalong with a third comparator and an additional lowest peak storage unit(both not shown in FIG. 5A) to determine if the negative peak value justdetermined and stored in the peak sample storage unit 120 (andaccessible on output 128) is indeed a lowest negative peak value. Thisarrangement will be discussed further when referring to the embodimentof FIG. 6.

Once a negative peak value has been determined by the embodiment of FIG.5A, a second peak determining unit arranged to collect a positive peaksample value may be employed to determine the next positive peak. Oneskilled in the art will appreciate that every negative peak must befollowed by a positive peak, and visa versa. Although minor peaks thatare above the level of the threshold signal 132 may be missed if thethreshold value 132 is set at too high a level, the impact on the peaksamples collected and the associated figures of merit is not importantas the most negative peak values will always be determined.

Referring now to FIG. 5B illustrated is a functional block diagram of anembodiment of a positive peak determining unit 116a to determinepositive peak sample values. The structure and operation of the positivepeak determining unit of FIG. 5B is very similar to that of the negativepeak determining unit of FIG. 5A, with the exception that thisembodiment is configured to determine positive peak values. Thefunctions of the scanner unit 90, the analog-to-digital converter 94,the newest sample storage unit 96, and the clock source 118 areequivalent to the embodiment of FIG. 5A. A peak sample storage unit 120ais responsive to a first comparator 122a, which is arranged to comparethe relative magnitudes of the sample values stored in the peak samplestorage unit 120a and the newest sample storage unit 96. In order todetermine the value of a positive peak, the peak sample storage unit120a must initially be set to the lowest value that theanalog-to-digital converter 94 can produce. As samples are generated bythe analog-to-digital converter 94, the comparator 122a determines ifthe newest sample value stored in the newest sample storage unit 96 isgreater (higher) than the value of the peak sample storage unit 120a. Ifthe newest sample value is higher, the newest sample may represent a newpositive peak value and the first comparator 122a provides a firstcontrol signal 124a to enable the peak sample storage unit 120a allowingthe new sample value to be stored (in the peak sample storage unit120a). This process of storing higher valued samples continues, until atpoint in time when the sample values produced by the analog-to-digitalconverter 96 begin to decrease in relative magnitude when compared tothe sample value stored in the peak sample storage unit 120a (i.e. aftera positive peak occurs). At this point a positive peak value has beendetermined and stored in the peak sample storage unit 120a, and thefirst control signal 124a no longer enables the peak sample storage unit120. Therefore, as desired, the positive peak sample value stored in thepeak storage unit 120a is to preserved.

Further provided with the embodiment of FIG. 5B is a summing unit 130included, as with the embodiment of FIG. 5A, to provide noise immunity.However, in this embodiment the polarity of the offset value produced bythe negative offset 134a, is negative. A second comparator 126a isarranged to determine when a threshold signal value 132a, now adjustedby the value of the negative offset 134a to be lower in magnitude thenthe value stored in the peak sample storage unit 120a, is higher thanthe magnitude of the sample value stored in the newest sample storageunit 96. Therefore, the sample value in the newest sample storage unitmust drop to a low enough level (below the system noise level), before asecond comparator 126a provides a second control signal 136a to indicatea positive peak value has been determined. By using the second controlsignal 136a to indicate when a positive peak value has been determined,along with the output 128a of the peak sample storage unit 120a, thevalue of peak sample storage unit may be saved and/or compared to aprevious positive peak value to determine if the value of the peaksample storage unit is a new highest positive peak sample value.

An astute observer, and certainly one skilled in the art, will noticethe redundancy of the embodiments of FIG. 5A and FIG. 5B. For example,with the exceptions of the "sense" of the comparisons provided by thefirst and second comparators, and the sign of the offset value, thesetwo embodiments are equivalent. It should therefore be possible tocombine the embodiments of FIGS. 5A and 5B to provided an embodimentwhich can alternately determine negative sample values and positivesample values, and in the process reduce the redundancy of theembodiments of FIG. 5A and FIG. 5B. In addition, by using the controlsignals 136 and 136a of FIGS. 5A and 5B, respectively, additional units(i.e. storage and comparator units) may be added to determine and storethe highest positive and lowest negative peak sample values for anelement.

Referring now to FIG. 6 there is provided a functional block diagram ofan embodiment of the invention for determining positive peak samplevalues and negative peak sample values of a scan reflectance signalrepresentative of an element of a bar code indicia. One full cycle ofoperation of this embodiment will determine a single pair of peak valuesconsisting of a lowest negative peak sample value and a highest positivepeak sample value. These peak values, when determined, may be saved in abuffer memory or be made immediately available to begin post-processingto determine at least one figure of merit indicative of the quality ofthe indicia being evaluated.

Turning again to FIG. 6, central to this embodiment is a polarityindicator 140 having two output signals C and D. Output signals C and Dmay be assumed to be digital in nature and switchable between a lowlogic level and a high logic level. Signals C and D will configure theembodiment of FIG. 6 to alternately determine negative peak samplevalues and positive peak sample values. As each peak sample value isdetermined, it will be checked to further determine if the newest peakvalue represents a lowest negative or highest positive peak samplevalue.

To clearly understand the operation of the embodiment of FIG. 6, it isimportant to understand the required initial conditions of various itemscomprising the embodiment. First the signal C is set to a high logiclevel, while signal D is reset to a low logic level. The signals C and Dmay essentially be considered complement signals--when one is high theother is low, and visa-verse. Second, highest peak sample storage unit142 and lowest peak sample storage unit 144 would be loaded with thelowest and highest sample values, respectively, the analog-to-digitalconverter 94 can produce. For example, for an 8-bit analog-to-digitalconverter the highest peak sample storage unit 142 would be loaded withan initial value of zero (0) and the lowest peak sample storage unit 144would be loaded with an initial value of 255. Although, the peak samplestorage unit 120b is shown in a simplified form, it should be understoodthat the peak sample storage unit must be capable of being initializedwith the highest possible sample value when determining a negative peakvalue and initialized with the lowest possible sample value whendetermining a positive peak value. To simplify the FIG. 6 embodiment,the peak sample storage unit is shown in a basic form. However, askilled person would be able to add the required logic (either hardwareor software implemented) to provide for the proper initializing of thepeak sample storage unit 120b. At the start of the analysis of a barcode indicia, the peak sample storage unit 120b would be initialized todetermine a negative peak value. As negative or positive peak samplevalues are determined, the peak sample storage unit 120b would bereloaded with the appropriate initial values in the manner as describedwith the embodiments of FIGS. 5A and 5B. Further, the initializing ofpeak sample value unit 120b would easily be supported by logic signalssuch as signals A, C, D, and a third signal E, provided by an edgedetection unit 146.

As the scan reflectance signal 92 is generated by a scanner unit (notshown in FIG. 6), an edge detection unit 146 monitors the scanreflectance signal 92 to detect the occurrence of a first edgeindicating the start of an element of the bar code indicia. At theoccurrence of the first edge a signal would be provided by signal E toinitialize the peak sample storage unit 120b, the highest peak samplestorage unit 142, and the lowest peak sample storage unit 144 with anappropriate set of initial values. The particular set of initial valuesare a function of the element (a bar or space) to be sampled. Aftersignal E is provided to initialize the required storage units, thesampling of the scan reflectance signal 92 by the analog-to-digitalconverter 94 would commence. As each new sample is stored in the newestsample storage unit 96, first comparator 122b compares the value of thenew sample to the value of the sample in the peak storage unit 120b.Comparator 122b produces a pair of control signals, one indicating ifthe new sample value is "greater than" the value in the peak samplestorage unit 120b and a second indicating if the value is "less than"the respective values. A first multiplexer 140 is arranged to couple theappropriate signal, either the "A greater than B" or the "A less than B"signal, to enable the peak sample storage register 120b. For example,when determining a negative peak sample value, signal C would be at alow logic level and configure the first multiplexer 140 to couple the "Aless than B" control signal to enable the peak sample storage unit 120b.As samples are produced and processed, new sample values would updatethe peak sample storage unit 120b when new lower sample values aredetermined. Thus, as with the embodiments of FIGS. 5A and 5B, the peaksample storage unit is responsive to the first comparator in that thedecision as to update or not update the peak sample storage unit 120b ismade by the first comparator 122b (via the first multiplexer 140).

The functions provided by the second comparator 126c, the summing unit130 and the offsets 134 and 134a are equivalent to those discussed forthe embodiments of FIGS. 5A and 5B. Additionally included in theembodiment of FIG. 6 are a second multiplexer 148 and a thirdmultiplexer 150. The second multiplexer 148 is provided to selectivelycouple either a "greater than" or a "less than" control signal producedby the second comparator 126c (to various components of the presentembodiment) as determined by signal C. When determining a negative peaksample value the "A greater than B" control signal provided by thesecond comparator 126c is coupled to these components, and whendetermining a positive peak sample value the "A less than B" controlsignal from the second comparator 126c is coupled. Similarly, the thirdmultiplexer 150 couples the positive offset 134 or the negative offset134a, respectively, to summing unit 130. The control signal 152 providedby multiplexer 148 is used for several purposes. (Functionally, thissignal is equivalent to the signals 136 and 136b of FIGS. 5A and 5b, inthat the signal indicates when a peak sample value has be determined.) Afirst use of control signal 152 is to clock or trigger the polarityindicator 140. Thus, when a negative or positive peak sample value hasbeen determined, the polarity unit is toggled to configure theembodiment of FIG. 6 to search for a peak of opposite polarity to thepeak just determined. Also control signal 152 is used to determine ifthe peak value just found should be stored as a new highest positive orlowest negative peak sample value, as will be discussed further.

Further provided with the embodiment of FIG. 6 is a third comparator 154and a forth multiplexer 156. The third comparator 154 is provided todetermine when a sample value stored in the peak sample storage unit120b is a new highest positive or lowest negative peak sample value andshould therefore be used to update the value stored in the highest peaksample storage unit 142 or the lowest peak sample storage unit 144,respectively. If the sample value stored in the peak sample storage unit120b is not a new peak value the previous peak values are preserved. Tofacilitate the storage of new highest/lowest peak sample values a firstgate 160a is provided to enable the highest peak sample storage unit 142if three conditions are satisfied. First, the polarity indicator mustindicate that a positive peak is being determined by providing a logiclow level with signal D. (Signal C would, therefore, be at a high logiclevel.) Next, the second comparator 126c must indicate (via secondmultiplexer 148) that a peak value has been determined and stored in thepeak sample storage unit 120b. And finally, the third comparator 154must indicate that the sample value stored in the peak sample storageunit 120b is greater than the value currently in the highest peakstorage unit 142. If all three conditions are satisfied, a new highestpositive peak sample value is stored in storage unit 142. In a similarmanner a second logic gate 160b is provided to determine if a new lowestnegative peak sample value should be stored in the lowest peak samplestorage unit 144 by enabling it at the appropriate times.

At a point in time when the edge detection unit 146 detects an edgeindicating the end of the present element (just sampled and processed)the values stored in the highest peak sample storage unit 142 and thelowest peak sample storage unit 144 may be loaded into a memory device,such as a FIFO, or made immediately available for post-processing. Thecontrol signal 162c is provided to indicate the values presently storedin the highest peak sample storage unit 142 and the lowest peak samplestorage unit 144 are valid (as highest positive and lowest negative peakvalues). In the simplest case, signal 162c may be used to clock thevalues of peak storage units 142 and 144 into a FIFO memory. Theprocessing of samples representative of the next element would thencommence by initializing the various storage units to the appropriateinitial values utilizing signal E, and the next group of samples wouldbe processed to determine the next pair of highest positive and lowestnegative peak sample values.

It can be noted that if either the highest peak sample storage unit 142or the lowest peak sample storage unit 144 contains the value that wasinitially loaded at the start of the sampling, then a peak of thecorresponding polarity was not found. For example, if after the samplingof an element is complete, the value of the highest peak sample storageunit 142 is still set to zero, then it may be assumed that no positivepeaks were determined. (The previous example would generally only occurwhen sampling a portion of the scan reflectance signal associated with abar element of high quality.)

It should also be noted that the embodiment of FIG. 6 is intended to berepresentative of implementations which may be provided by hardwarebased embodiments, or by hardware/software (or hardware/firmware) basedsolutions that incorporate, for example, DSP like sub-systems. Indeed,skilled persons will understand the variety of such implementationsavailable in the art. A preferred embodiment of the present inventionmay be implemented with a Personal Computer (PC) having an expansionplug-in card. The expansion plug-in card including an implementation ofthe embodiment of FIG. 6. The PC would then serve as a post-processingcomputer. Yet other stand-alone embodiments, utilizing an embeddedcomputing unit are possible. It is contemplated that the presentinvention includes all such embodiments that process in real-time samplevalues produced from a scan reflectance signal to determine highestpositive and lowest negative peak sample values for each elementcomprising a bar code indicia, wherein the peak sample values determinedare post-processed (along with width counts for each element) todetermine at least one figure of merit indicative of the quality of theindicia.

While there have been described the currently preferred embodiments ofthe present invention, those skilled in the art will recognize thatother and further modifications may be made without departing from theinvention and it is intended to claim all modifications and variationsas fall within the scope of the invention and the appended claims.

What is claimed is:
 1. A method for evaluating the quality of a bar codeindicia by processing a scan reflectance profile signal representativeof elements of the bar code indicia, the scan reflectance profile signalgenerated by scanning the bar code indicia, said method comprising thesteps of:a) detecting a first edge of the scan reflectance signal as thebar code indicia is being scanned, the first edge indicating thebeginning of a first element of the bar code indicia; b) sampling aportion of the scan reflectance signal representative of said element toproduce a sequence of sample values; c) processing said sequence ofsample values of step b) as each sample value is produced to determine ahighest positive peak sample value and a lowest negative peak samplevalue provided by said sequence of sample values associated with saidelement being scanned and sampled; d) detecting a next edge of the scanreflectance signal indicating the end of said element and the start ofthe scanning and sampling of an adjacent element; e) storing into a peaksample buffer memory said highest positive and lowest negative peaksample values determined in step c); and f) repeating steps b), c), d)and e) for a plurality of adjacent elements that along with the firstprocessed element form the bar code indicia; said highest positive peakand lowest negative peak sample values stored in step e) for eachelement scanned being accessible in said peak sample buffer memory forpost-processing to determine at least one figure of merit associatedwith the quality of the bar code indicia.
 2. The method of claim 1further comprising the step of post-processing said highest positive andlowest negative peak sample values for each element comprising the barcode indicia to determine at least one figure of merit indicative of thequality of the bar code indicia being evaluated.
 3. The method of claim1 wherein a plurality of scan reflectance profile signals generated byscanning the bar code indicia at spaced locations along the height ofthe elements of the bar code indicia are processed in succession todetermine said highest positive and lowest negative peak sample valuesfor each element comprising the bar code indicia for each said scanreflectance profile signal generated.
 4. The method of claim 3 furthercomprising the step of post-processing said highest positive and lowestnegative peak sample values determined for each element of each scanreflectance profile signal processed to determine at least one figure ofmerit indicative of the overall quality of the bar code indicia beingevaluated.
 5. The method of claim 1 wherein detecting an edge within thescan reflectance signal in step d), causes an element width count to bestored in an element width buffer memory at step d);said storing ofelement width counts continuing until all portions of the scanreflectance profile signal representative of the elements of the barcode indicia are processed.
 6. The method of claim 5 further comprisingthe step of post-processing said highest positive peak sample value,said lowest negative peak sample value, and said element width countvalue determined for each element to determine at least one figure ofmerit indicative of the quality of the bar code indicia being evaluated.7. A method for evaluating the quality of a bar code indicia byprocessing a scan reflectance profile signal representative of theelements of the bar code indicia, the scan reflectance profile signalgenerated by scanning the bar code indicia, said method comprising thesteps of:a) sampling the scan reflectance signal to provide a sequenceof sample values representative of each element of the bar code indicia;and b) processing each sample value of said sequence of sample values aseach sample is produced in step a) to determine a highest positive peaksample value and a lowest negative peak sample value associated witheach element of the bar code indicia; thereby determining a plurality ofpairs of peak sample values, each pair consisting of said highestpositive and lowest negative peak sample values for each scannedelement, each of said pairs of peak sample values being accessible forpost-processing to determine at least one figure of merit indicative ofthe quality of the bar code indicia.
 8. The method of claim 7 furthercomprising the step of storing said highest positive and lowest negativepeak sample values in a peak sample buffer memory as they are determinedin step b).
 9. The method of claim 7 wherein a plurality of scanreflectance profile signals generated at spaced locations along theheight of the elements comprising the bar code indicia are processed insuccession to determine said highest positive and lowest negative peaksample values for each element comprising said bar code indicia for eachscan reflectance profile signal generated;said highest positive andlowest negative peak sample values being accessible to determine atleast one figure of merit indicative of the overall quality of the barcode indicia being evaluated.
 10. The method of claim 9 furthercomprising the step of post-processing said highest positive and lowestnegative peak sample values determined for each element of each scanreflectance profile signal processed to determine at least one figure ofmerit indicative of the overall quality of the bar code indicia beingevaluated.
 11. An apparatus for evaluating the quality of a bar codeindicia by processing a scan reflectance profile signal representativeof elements of the bar code indicia, the scan reflectance profile signalprocessed as it is generated by a scanner unit arranged to scan the barcode indicia, said apparatus comprising:an analog-to-digital converterto sample the scan reflectance profile signal as it is generated by saidscanner unit, said analog-to-digital converter producing a sequence ofsamples, each sample having a value representative of the analog valueof the scan reflectance signal; an edge detection unit to detect edgeswithin the scan reflectance profile signal, the edges indicating thestart of each element within the bar code indicia; and a peak sampledetermining unit that is coupled to the analog-to-digital converter,said peak sample determining unit provided to determine a highestpositive peak sample value and a lowest negative peak sample value foreach element from the sample values produced by said analog-to-digitalconverter as each element within the bar code indicia is scanned; saidhighest positive and lowest negative peak sample values determined foreach element already scanned being immediately accessible to beginpost-processing to determine at least one figure of merit indicative ofthe quality of the bar code indicia being evaluated.
 12. The apparatusof claim 11, further comprising a peak sample buffer memory to storesaid highest positive and lowest negative peak sample values as saidvalues are determined by said peak sample determining unit for eachscanned element of the bar code indicia.
 13. The apparatus of claim 12,further comprising a post-processing computer to read and post-processsaid peak sample values stored in said peak sample buffer memory todetermine at least one figure of merit indicative of the quality of thebar code indicia.
 14. An apparatus for evaluating the quality of a barcode indicia by processing a scan reflectance profile signalrepresentative of elements within the bar code indicia, the scanreflectance profile signal generated by a scanner unit and sampled by ananalog-to-digital converter to produce a sequence of samples, eachsample representative of the analog value of the scan reflectancesignal, said apparatus comprising:an edge detection unit to detect edgeswithin the scan reflectance profile signal, the edges indicating thestart of each of the elements of the bar code indicia; and a peak sampledetermining unit coupled to the analog-to-digital converter, said peaksample determining unit provided to determine, for each element ahighest positive peak sample value and a lowest negative peak samplevalue from the sample values produced by said analog-to-digitalconverter as each element within the bar code indicia is scanned;wherein said highest positive and lowest negative peak sample valuesdetermined for already processed elements are accessible to beginpost-processing to determine at least one figure of merit indicative ofthe quality of the bar code indicia.
 15. The apparatus of claim 14,further comprising a peak sample buffer memory to store said highestpositive and lowest negative peak sample values determined for eachelement of said bar code indicia until said peak sample values areneeded for post-processing.
 16. The apparatus of claim 15, furthercomprising a post-processing computer to post-process said peak samplevalues stored in said peak sample buffer memory to determine at leastone figure of merit indicative of the quality of the bar code indicia.17. An apparatus to enable the evaluation of the quality of a bar codeindicia by processing a scan reflectance profile signal representativeof the elements within the bar code indicia as the scan reflectanceprofile is generated to determine a highest positive peak sample valueand a lowest negative peak sample value of each element, the scanreflectance profile signal generated by a scanner unit arranged to scanthe bar code indicia, said apparatus comprising:an analog-to-digitalconverter, to sample the scan reflectance signal as it is generated bysaid scanner unit, to produce a sequence of sample values representativeof the analog value of the scan reflectance signal; an edge detectionunit to detect edges within the scan reflectance profile signal, theedges indicating the beginning of elements of the bar code indicia andfurther indicative of the end of each of said elements and when saidhighest positive and lowest negative peak sample values have beendetermined for each scanned element; a polarity indicator to indicate apolarity of a peak sample value to next be determined, said polaritybeing indicated by a first logic level when determining a positive peaksample value or a second logic level when determining a negative peaksample value; and a peak sample determining unit to determine saidhighest positive peak sample value and said lowest negative peak samplevalue from the sample values provided by said analog-to-digitalconverter as each element within the bar code indicia is scanned, saidpeak sample determining unit having: a peak sample storage unitresponsive to a first comparator, said first comparator producing afirst control signal to enable said peak sample storage unit to store acurrent sample produced by said analog-to-digital converter if saidcurrent sample value is of the proper relative magnitude so as torepresent a possible new peak value with respect to the polarityindicated by said polarity indicator; a second comparator for comparingthe relative magnitude of said current sample to the relative magnitudeof a value being equal to a sum of the sample value currently stored insaid peak sample storage unit and an offset value, said secondcomparator indicating when a peak value has been determined andproviding a second control signal to said polarity indicator toconfigure said peak sample determining unit to determine a peak ofopposite polarity to the peak just determined; and a highest peak samplestorage unit to store said highest positive peak sample value and alowest peak sample storage unit to store said lowest negative peaksample value, each of said peak sample value stored being determinedfrom the sequence of sample values produced by said analog-to-digitalconverter as each element of the bar code indicia is scanned andsampled; said highest and lowest peak sample storage units beingresponsive to a third comparator in combination with said second controlsignal, said third comparator included to compare the relativemagnitudes of said value stored in said peak sample storage unit andsaid value currently stored in said highest peak sample storage unit orsaid lowest peak sample storage unit as determined by said polarityindicator, and storing said value of said peak sample storage unit insaid highest peak sample storage unit or said lowest peak sample storageunit when said third comparator determines that a new highest positiveor lowest negative peak sample value has been determined; said polarityindicator configuring the peak sample determining unit to alternatelydetermine opposite polarity peak sample values until the edge detectionunit detects an edge of the scan reflectance profile signal indicatingthat said highest positive and lowest negative peak sample values havebeen determined for the element currently being scanned and processed.18. The apparatus of claim 17, further comprising a peak sample buffermemory to hold said highest positive and lowest negative peak samplevalues determined for each scanned element of said bar code indiciauntil said peak sample values are needed for post-processing.
 19. Theapparatus of claim 18, further comprising a post-processing computer toreceive and post-process said peak sample values stored in said peaksample buffer memory to determine at least one figure of meritindicative of the quality of the bar code indicia.
 20. An apparatus toprocess a sequence of sample values representative of a portion of ascan reflectance profile signal generated by a scanner unit scanningelements of a bar code indicia, said sample values produced by ananalog-to-digital converter arranged to sample the scan reflectancesignal as it is generated, said apparatus processing each sample of saidsequence of sample values as each sample is produced to determine ahighest positive peak sample value and a lowest negative peak samplevalue for each element as each element is scanned, said apparatuscomprising:a polarity indicator to indicate a polarity of a peak samplevalue to be determined, said polarity being indicated by a first logiclevel when determining a positive peak sample value and a second logiclevel when determining a negative peak sample value; a peak samplestorage unit responsive to a first comparator, said first comparatorproducing a first control signal to enable said peak sample storage unitto store a current sample produced by said analog-to-digital converterif said current sample is of the proper relative magnitude so as torepresent a possible new peak sample value with respect to the polarityindicated by said polarity indicator; a second comparator for comparingthe relative magnitude of said current sample to the relative magnitudeof a value being equal to a sum of the sample value currently stored insaid peak sample storage unit and an offset value, said secondcomparator indicating when a peak value has been determined andproviding a second control signal to said polarity indicator toconfigure said apparatus to determine a peak of opposite polarity to thepeak just determined; and a highest peak sample storage unit to storesaid highest positive peak sample value and a lowest peak sample storageunit to store said lowest negative peak sample value, each of saidhighest positive and lowest negative peak sample values stored beingdetermined from the sequence of sample values produced by theanalog-to-digital converter as each element of the bar code indicia isscanned; said highest and lowest peak sample storage units beingresponsive to a third comparator in combination with said second controlsignal, said third comparator included to compare the relativemagnitudes of said value stored in said peak sample storage unit andsaid value currently stored in said highest peak sample storage unit orsaid lowest peak sample storage unit as determined by said polarityindicator, and storing said value of said peak sample storage unit insaid highest peak sample storage unit or said lowest peak sample storageunit when said third comparator determines that a new highest positiveor lowest negative peak sample value has been determined by theprocessing of said sequence of sample values produced as each element isscanned and sampled; said polarity indicator configuring the apparatusto alternately determine opposite polarity peak values until thesequence of sample values representative of each element has beenprocessed and said highest positive and lowest negative peak samplevalues for each element scanned has been determined.